package com.bill.common.business.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.bill.common.user.entity.RegisterUser;
import com.sinba.common.entity.BaseDomainEntity;

/**
 * 买入
 * @author Think
 *
 */
@SuppressWarnings({ "rawtypes", "serial" })
@Entity
@Table(name="b_buy")
public class Buy extends BaseDomainEntity{
	@Id
    @GeneratedValue( strategy = GenerationType.AUTO )
	private Long id;
	private String bcode;
	private String buyUser;//买入会员
	private Long buyMoney;//买入金额(买入股数)
	private Integer status=0;//状态（0排队中,1匹配成功，2交易成功,3已取消）
	private Date matchTime;//匹配时间
	private Integer priority;//优先级
	private Long surplusMoney=0L;//剩余
	private boolean mayFirstSingle=false;//可能首单
	@ManyToOne
	private RegisterUser user;
	private Integer fengHongDays=0;
	private Double buyPrice;//买入价格
	private Double dBuyMoney;//买入金额
	private Double dSurplusMoney=0D;//剩余
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getBuyUser() {
		return buyUser;
	}
	public void setBuyUser(String buyUser) {
		this.buyUser = buyUser;
	}
	public Long getBuyMoney() {
		return buyMoney;
	}
	public void setBuyMoney(Long buyMoney) {
		this.buyMoney = buyMoney;
	}
	public Integer getStatus() {
		return status;
	}
	public void setStatus(Integer status) {
		this.status = status;
	}
	public Date getMatchTime() {
		return matchTime;
	}
	public void setMatchTime(Date matchTime) {
		this.matchTime = matchTime;
	}
	public Integer getPriority() {
		return priority;
	}
	public void setPriority(Integer priority) {
		this.priority = priority;
	}
	public Long getSurplusMoney() {
		return surplusMoney;
	}
	public void setSurplusMoney(Long surplusMoney) {
		this.surplusMoney = surplusMoney;
	}
	public boolean isMayFirstSingle() {
		return mayFirstSingle;
	}
	public void setMayFirstSingle(boolean mayFirstSingle) {
		this.mayFirstSingle = mayFirstSingle;
	}
	public RegisterUser getUser() {
		return user;
	}
	public void setUser(RegisterUser user) {
		this.user = user;
	}
	public Integer getFengHongDays() {
		return fengHongDays;
	}
	public void setFengHongDays(Integer fengHongDays) {
		this.fengHongDays = fengHongDays;
	}
	public Double getBuyPrice() {
		return buyPrice;
	}
	public void setBuyPrice(Double buyPrice) {
		this.buyPrice = buyPrice;
	}
	public Double getdBuyMoney() {
		return dBuyMoney;
	}
	public void setdBuyMoney(Double dBuyMoney) {
		this.dBuyMoney = dBuyMoney;
	}
	public Double getdSurplusMoney() {
		return dSurplusMoney;
	}
	public void setdSurplusMoney(Double dSurplusMoney) {
		this.dSurplusMoney = dSurplusMoney;
	}
	public String getBcode() {
		return bcode;
	}
	public void setBcode(String bcode) {
		this.bcode = bcode;
	}
}
